package com.weipai.education.mapper;

import com.weipai.education.model.ProductGoods;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ProductGoodsMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ProductGoods record);

    int insertSelective(ProductGoods record);

    ProductGoods selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ProductGoods record);

    int updateByPrimaryKey(ProductGoods record);

    List<Map<String,Object>> getAllGoodsBar(@Param("productId") Integer productId,
                                            @Param("type") String type);

    int getGoodsBarCountByProductId(Object productId);

    ProductGoods verifyGoodsBarCodes(@Param("productId") String productId, @Param("goodsBarCode") String goodsBarCode);

    int updateProductGoods(@Param("goodsBarCode") String goodsBarCode, 
                           @Param("isUse") int isUse, 
                           @Param("isPrice") String isPrice, 
                           @Param("isDamage") String isDamage);

}